package com.example.demo.properties;

import com.example.demo.util.YamlPropertyLoaderFactory;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "child.boy")
@PropertySource(value = "classpath:config/child.yml", encoding = "UTF-8", factory = YamlPropertyLoaderFactory.class)
// 自定义配置文件,需要引入路径
@Data
public class ChildInfoProps {


    private Integer height;

    private Float weight;

    private String name;

    private String sex;

}
